package com.daiyang.javabasics.deom;

public class MyRunable implements Runnable {
    @Override
    public void run() {
        System.out.println("MyRunable" + Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        Thread t = new Thread(new MyRunable());
        t.start();
        Thread t2=new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(
                        "MyRunable" + Thread.currentThread().getName()
                );
            }
        });
        t2.start();
        Thread t3=new Thread(() -> System.out.println("MyRunable" + Thread.currentThread().getName()));


    }
}
